const mongoose = require('mongoose');
const dbURL = 'mongodb://localhost:27017/insuranceSystem'
mongoose.connect(dbURL, { useNewUrlParser: true, useUnifiedTopology: true });
//当数据库连接成功触发该事件
mongoose.connection.once('open', () => {
  console.log(dbURL + '数据库连接成功');
})